import persistedState from 'vuex-persistedstate'
import utils from '@/libs/utils'
const state = {
  openId:'1234',
  userId:'1234'
}
const getters = {
  user: state => state,
}

const mutations = {
  setUser (state, options) {
    utils.func.merge(state, options)
  }
}

export const userInfo = {
  namespaced: true,
  state,
  getters,
  mutations,
}
export const persistedStateUser = persistedState({
  storage: window.localStorage,
  key: 'active_user',
  paths: ['userInfo']
});
